package com.eeprint.system.domain.terminal.vo;

import com.eeprint.system.domain.common.PrintCodeData;
import com.eeprint.system.domain.terminal.dto.PrintJobData;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigInteger;
import java.util.Date;

/**
 * 返回前端数据：打印记录列表
 *
 * @author Samven7
 * @date 2020/10/18 15:24
 */
@Data
@NoArgsConstructor
@ToString
public class TerminalPrintJobData {

    /** 作业编号 */
    private BigInteger id;

    /** 创建时间 */
    private Date createAt;

    /** 状态 */
    private Integer printStatus;

    /** 原文件名 */
    private String documentName;

    /** 份数 */
    private Integer printPageCount;

    /** 页数 */
    private Integer printPaperCount;

    /** 起始 */
    private Integer printPageStart;

    /** 结束 */
    private Integer printPageEnd;

    /** 纸型 */
    private String printerPaperSubmit;

    /** 颜色 */
    private Integer printerColorSubmit;

    /** 单双 */
    private Integer printerDuplexSubmit;

    /** 打印机名 */
    private String printerName;

    /** 下载文件路径 */
    private String documentDir;


    public TerminalPrintJobData(PrintJobData pj, PrintCodeData pc) {
        this.id = pj.getId();
        this.createAt = pj.getCreateAt();
        this.printStatus = pj.getPrintStatus();
        this.documentName = pj.getDocumentName();
        this.printPageCount = pj.getPrintPageCount();
        this.printPaperCount = pj.getPrintPaperCount();
        this.printPageStart = pj.getPrintPageStart();
        this.printPageEnd = pj.getPrintPageEnd();
        this.printerPaperSubmit = pc.getPaper();
        this.printerColorSubmit = pc.getColor();
        this.printerDuplexSubmit = pc.getDuplex();
        this.printerName = pj.getPrinterName();
        this.documentDir = pj.getDocumentDir();
    }



}
